#include <stdio.h>
#include "../include/line.h"
#include "../include/scanner.h"
#include "../include/pool.h"
#include "../include/chunk.h"
#include "../include/prototype.h"

_int print(Line *line, Prototype *prototype, _int numOfParmas)
{
    for (int i = 0; i < numOfParmas; i++)
    {
        printf("QWQ");
    }
    printf("\n");
}

_int main(_int argc, _byte const *argv[])
{
    Line line;
    Line_Init(&line);

    Prototype prototype;
    C_Prototype_Init(&prototype, print, -1);

    Chunk chunk;
    Map map;
    Map_Init(&map, 16);
    String s_print;
    String_Init(&s_print, "print");

    Prototype p_print;
    C_Prototype_Init(&p_print, print, -1);



    Closure closure;
    closure.prototype = &p_print;

    Map_Put(&map, TSTRING(&s_print), TCLOSURE(&closure));
    chunk.reslut = TMAP(&map);

    

    // chunk.reslut

    // Scanner s;
    // Scanner_Init(&s);
    // Scanner_Parse_File(&s, "C:\\Users\\14194\\Desktop\\Line\\main.line", line.exception);
    // Scanner_Print(&s);
    return 0;
}
